//
//  RZQCuriousChooseCollectionViewCell.m
//  LastOne
//
//  Created by dllo on 15/11/6.
//  Copyright © 2015年 sc. All rights reserved.
//

#import "RZQCuriousChooseCollectionViewCell.h"
#import "FitHeader.h"
#import <UIImageView+WebCache.h>
#import "NightHeader.h"
@implementation RZQCuriousChooseCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatAction];
        [self.contentView NightWithType:UIViewColorTypeNormal];
    }
    return self;
}
-(void)creatAction
{
    _gifImage = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 100 * FitWidth, 80 * FitHeight)];
    _gifImage.backgroundColor = [UIColor redColor];
    
    [self.contentView addSubview:_gifImage];
    
    
    _label  = [[UILabel alloc]initWithFrame:CGRectMake(_gifImage.frame.size.width + 10 *FitWidth, 30 * FitHeight, 200 * FitWidth, 20 * FitHeight)];
   
    [self.contentView addSubview:_label];
 
    _choose = [[UILabel alloc]init];
    _choose.frame = CGRectMake(_gifImage.frame.size.width + 10 *FitWidth + _label.frame.size.width, 30 * FitHeight, 20 * FitWidth, 20 * FitHeight);
    _choose.layer.borderWidth = 2.0;
    _choose.layer.cornerRadius = 10;
    _choose.clipsToBounds = YES;
    [_choose NightWithType:UIViewColorTypeNormal];
    [self.contentView addSubview:_choose];
   
    
}

-(void)layoutSubviews
{
    [super layoutSubviews];
}
-(void)setModelData:(ChooseModel *)modelData
{
    if (_modelData != modelData) {
        _modelData = modelData;
    }
    [_gifImage sd_setImageWithURL:[NSURL URLWithString:_modelData.image] placeholderImage:[UIImage imageNamed:@"placeholder"]];
    _label.text = _modelData.content;
    [_label NightWithType:UIViewColorTypeNormal];
    
    _label.font =  [UIFont fontWithName:@"Helvetica-Bold" size:18 ];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
